﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using Rifts.Models.Definitions;

namespace Rifts.Creator
{
	/// <summary>
	/// Interaction logic for SelectRace.xaml
	/// </summary>
	public partial class SelectRace : Page
	{
		public SelectRace()
		{
			InitializeComponent();
		}

		public CreatorViewModel TypedDataContext
		{
			get { return (CreatorViewModel)DataContext; }
		}

		private void Button_Click(object sender, RoutedEventArgs e)
		{
			var race = (Race)((FrameworkElement)sender).DataContext;
			TypedDataContext.ApplyRace(race);

		}
	}
}
